//
//  UserManager.h
//  ITMS
//
//  Created by 中矿科技有限公司 on 16/7/13.
//  Copyright © 2016年 中矿科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

//设置枚举
typedef NS_ENUM(NSUInteger, ZYDConnectionStatus) {
    /// 被踢
    ZYDConnectionStatusForceLogout = 1000,
    /// 手动登出
    ZYDConnectionStatusMannualLogout,
    //重新选车
    ZYDConnectionStatusCarLogout,
};
@interface UserManager : NSObject
+ (UserManager *)sharedInstance;


//登录
- (BOOL)login:(NSDictionary*)userInfo;
//保存用户信息
- (BOOL)storeUserInfoToUserDefaults:(NSDictionary *)userInfo;
//退出登录
- (void)logout;
//是否登录
- (BOOL)isLogin;


//获取邮箱
- (NSString *)getEmailAddress;

//获取手机号
- (NSString*)getMobile;
//获取昵称
- (NSString*)getNickname;

- (NSString*)getUserName;

- (NSString*)getCompanyName;

- (NSString*)getOuName;

- (NSString*)getPositionTitle;

- (NSString*)getUserId;

@property(nonatomic,copy)NSString *token;

@property(nonatomic,assign) BOOL hasEquipment;
@property (nonatomic, assign) ZYDConnectionStatus lastConnectionStatus;

@end
